package com.jd;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {

    public static void main(String[] args) {
        //加载spring配置文件，启动容器
        ClassPathXmlApplicationContext ca =
                new ClassPathXmlApplicationContext("applicationContext.xml");
        //使用
        System.out.println(ca.getBean(Book.class));
        System.out.println(ca.getBean("xiaoming"));


    }
}
